<!-- Author: Moe Kyaw Thu Aung --> 
<!-- Last Modified: 11 Sep 2012 -->
<?php
	session_start();
	
	include("lib.php");
	
	$id = $_POST["id"];
	$name = $_POST["name"];
	$des = $_POST["des"];
	$price = $_POST["price"];
	$qty = $_POST["qty"];
	
	$conn = mysql_connect("localhost", "root", "");
	mysql_select_db("shopping", $conn);
	
	mysql_query("UPDATE books SET name='$name', des='$des', price='$price', qty='$qty' WHERE id=$id");
	
	set_msg("Successfylly updated a book!");
	
	header("location: index.php");
?>
